from rest_framework.views import APIView
from rest_framework.response import Response


class Home(APIView):
    def get(self, request, *args, **kwargs):
        data_dic = {
            'status': 200,
            'msg': "成功",
            'data': [
                {'name': '嘻嘻嘻'},
                {'name': '哈哈哈'},
                {'name': 'xxx'}
            ]
        }
        return Response(data=data_dic, status=200)


class Detail(APIView):
    def get(self, request, *args, **kwargs):
        data_dic = {
            'status': 200,
            'msg': "成功",
            'data': [
                {'name': 'aaa'},
                {'name': 'bbb'},
                {'name': 'ccc'}
            ]
        }
        return Response(data=data_dic, status=200)
